package com.yan.kfgl.web;

import com.yan.kfgl.model.vo.ShownUser;
import com.yan.kfgl.service.biz.facade.UserService;

public class UserAction {

	private String result;
	private ShownUser user;
	private UserService userService;
	private String password;
	
	public String saveOrUpdateUser(){
		boolean flag = userService.saveOrUpdate(user , password);
		if(flag){
			result = "1";
		}else{
			result = "0";
		}
		
		return "none";
	}
	
	public String showPersonalCenter(){
		user = userService.findShownUserByName(user);
		return "success";
	}
	
	public UserService getUserService() {
		return userService;
	}

	public void setUserService(UserService userService) {
		this.userService = userService;
	}

	public ShownUser getUser() {
		return user;
	}

	public void setUser(ShownUser user) {
		this.user = user;
	}

	public String getResult() {
		return result;
	}

	public void setResult(String result) {
		this.result = result;
	}
	
}
